﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            var uid = textBox1.Text;
            var pwd = textBox2.Text;
            var Repwd = textBox3.Text;

            var uidNull = !string.IsNullOrEmpty(uid);
            var pwdNull = !string.IsNullOrEmpty(uid);
            var RepwdNull = pwd == Repwd;
            if (uidNull && pwdNull && RepwdNull)
            {
                MessageBox.Show("注册成功");
                Form1.users.Add(uid, pwd);
              

            }
            else
            {
                MessageBox.Show("注册失败");
                
            }
            this.Close();

        }
    }
}
